Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overridable wrapper to CreatibutorsModal role SelectField #1759

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mkloeppe
Copy link

@mkloeppe mkloeppe commented Jul 3, 2024

❤️ Thank you for your contribution!

Description

Please describe briefly your pull request.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@mkloeppe mkloeppe requested a review from kpsherva July 3, 2024 11:10
@mkloeppe mkloeppe self-assigned this Jul 3, 2024
@mkloeppe mkloeppe added the ux label Jul 3, 2024
@mkloeppe mkloeppe requested a review from carlinmack July 3, 2024 11:15
@mkloeppe
Copy link
Author

mkloeppe commented Jul 3, 2024

I hope this overriadable ID InvenioRdmRecords.Deposit.CreatibutorsModalRoleSelectField.Container is fitting.

@carlinmack carlinmack removed their request for review August 26, 2024 09:35
@karkraeg
Copy link
Member

Hi @kpsherva could you please look into this? Would it be possible to merge this or is something missing?

@carlinmack
Copy link
Contributor

carlinmack commented Sep 12, 2024

could you remove the merge commits and push again?

steps:

  1. remove the merge commits
  2. checkout master and pull git switch master && git pull origin master
  3. checkout your branch git switch creatibutor-modal-overridable
  4. rebase on master git rebase master creatibutor-modal-overridable
  5. and force push git push -f

@SarahW91
Copy link
Contributor

could you remove the merge commits and push again?

I did and I hope this works for you now, @carlinmack. If it does, could you please merge now?

</Button>
}
/>
<OverridableContext.Provider value={overriddenComponents}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By putting the context provider here, we are risking having many nested context providers and it might have unpredicted consequences (one of them being confusion). Why not having the context provider at the level of the form rendering (RDMDepositForm in invenio-app-rdm?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkloeppe Could you look into this?

optimized
scrolling
/>
<Overridable id="InvenioRdmRecords.Deposit.CreatibutorsModalRoleSelectField.Container">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are missing passing props to this component. Without props passed to overridable you will not be able to access any props in your overridden cmp (fe. you don't want to override fieldPath, because the form will not work)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkloeppe Could you look into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants